home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / dfpp01.zip / CLOCK.CPP < prev    next >
C/C++ Source or Header  |  1992-11-21  |  409b  |  21 lines

  1. // ------- clock.cpp
  2.  
  3. #include "desktop.h"
  4.  
  5. Clock::Clock()
  6. {
  7.     clocktimer.SetTimer(0);
  8. }
  9.  
  10. void Clock::DispatchEvent()
  11. {
  12.     if (clocktimer.TimedOut())    {
  13.         // -------- reset the timer
  14.         clocktimer.SetTimer(19);    // approx. 19 tics/second
  15.         // -------- post the clock event
  16.         if (desktop.ApplWnd() != NULL)
  17.             desktop.ApplWnd()->ClockTick();
  18.     }
  19. }
  20.  
  21.